﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WWNotice.DingDingModel
{
    public class DingDing
    {
        public string msgtype { get; set; } = "markdown";
        public TEXT text { get; set; }
        public MarkDown markdown { get; set; }
        public AT at { get; set; }
        public DingDing(string message, string title = "")
        {
            text = new TEXT(message);
            at = new AT();
            markdown = new MarkDown(title, message);
        }
    }

    public class TEXT
    {
        public string content { get; set; }
        public TEXT(string message)
        {
            content = message;
        }
    }

    public class AT
    {
        public string[] atMobiles { get; set; }

        public bool isAtAll { get; set; } = true;
    }

    public class MarkDown
    {
        public string title { get; set; }

        public string text { get; set; }

        public MarkDown(string title, string text)
        {
            this.title = title;
            this.text = text;
        }
    }
}
